import { defineConfig, presetAttributify, presetUno } from 'unocss'

export default defineConfig({
  presets: [
    presetUno(),        // 基础预设
    presetAttributify() // 属性模式支持
  ],
  rules: [
    // 自定义规则
    [/^m-(\d+)$/, ([, d]) => ({ margin: `${d}px` })],
  ],
  shortcuts: {
    // 自定义快捷方式
    'btn': 'py-2 px-4 rounded shadow-md hover:shadow-lg transition',
    'center': 'flex justify-center items-center'
  },
  theme: {
    colors: {
      primary: '#3498db',
      secondary: '#2ecc71'
    }
  }
})